<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
		<title></title>
	</head>
	<body>
		
		<div id="app">
			<custom-input
			  v-bind:value="searchText"
			  v-on:input="searchText = $event"
			></custom-input>
			<custom-input v-model="searchText"></custom-input>
		</div>
		
		<script type="text/javascript">
			Vue.component('custom-input', {
			  props: ['value'],
			  template: `
			    <input
			      v-bind:value="value"
			      v-on:input="$emit('input', $event.target.value)"
			    >
			  `
			})
			
		var vm =new Vue({
				el:"#app",
				data:{
					searchText:""
				}
			})
		</script>
		
	</body>
</html>
